/*
 * Copyright (c) 2016- 2020 qolome.com Inc. All Rights Reserved.
 * ProjectName: qolome-knowledge
 * FileName: Mouse.java
 * Author: jiangfeng@qolome.com
 * Date: 2020/3/28 下午2:42
 * LastModified: 2020/03/22 22:48:22
 */

package com.qolome.knowledge.design.pattern.observer.demo.mouseevent.handler;

import com.qolome.knowledge.design.pattern.observer.demo.mouseevent.core.EventContext;

/**
 * 具体的被观察者
 * Created by Tom.
 */
public class Mouse extends EventContext {


    public void click(){
        System.out.println("调用单击方法");
        this.trigger(MouseEventType.ON_CLICK);
    }

    public void move(){
        System.out.println("调用移动方法");
        this.trigger(MouseEventType.ON_MOVE);
    }
}
